package darkaif.model.sandy

{
	/**
	* ...
	* @author Darknet
	* Copy Rights (c) http://darkaif.googlecode.com
	*/
	import sandy.primitive.Primitive3D;
	import sandy.core.scenegraph.Geometry3D;
	import sandy.core.scenegraph.Shape3D;

	public class platform_trio_float extends Shape3D implements Primitive3D {
		private var l:Geometry3D;
		
		private function f(v1:Number,v2:Number,v3:Number,uv00:Number,uv01:Number,uv10:Number,uv11:Number,uv20:Number,uv21:Number,normX:Number,normY:Number,normZ:Number):void {
			var uv1:Number = l.getNextUVCoordID();
			var uv2:Number = uv1 + 1;
			var uv3:Number = uv2 + 1;
			
			l.setUVCoords(uv1,uv00,1-uv01);
			l.setUVCoords(uv2,uv10,1-uv11);
			l.setUVCoords(uv3,uv20,1-uv21);
			
			l.setFaceVertexIds(l.getNextFaceID(), v1,v2,v3);
			l.setFaceUVCoordsIds(l.getNextFaceUVCoordID(), uv1,uv2,uv3);
			l.setFaceNormal(l.getNextFaceNormalID(), normX,normZ,normY);
		}
		
		private function f2(v1:Number,v2:Number,v3:Number):void {
			l.setFaceVertexIds(l.getNextFaceID(), v1,v2,v3);
		}
		
		private function v(vx:Number,vy:Number,vz:Number):void {
			l.setVertex(l.getNextVertexID(),vx,vz,vy);
		}
		
		public function platform_trio_float( p_Name:String=null ) {
			super( p_Name );
			geometry = generate();
		}
		
		public function generate(... arguments):Geometry3D {
			l = new Geometry3D();
			v(-15.750000,3.897110,-3.600000);
			v(-11.250002,11.691341,-3.600000);
			v(11.250000,11.691347,-3.600000);
			v(15.749999,3.897117,-3.599999);
			v(4.500000,-15.588462,-3.599999);
			v(-4.499997,-15.588460,-3.600000);
			v(-15.750001,3.897112,-0.000001);
			v(-11.250004,11.691340,-0.000001);
			v(11.249990,11.691349,-0.000001);
			v(15.750001,3.897124,0.000000);
			v(4.500010,-15.588449,0.000000);
			v(-4.499990,-15.588469,-0.000001);
			v(-0.000001,0.000000,0.000000);
			v(-18.178209,15.691338,-0.000008);
			v(-22.678207,7.897108,-0.000008);
			v(-18.178207,15.691340,-3.600008);
			v(-22.678205,7.897106,-3.600008);
			v(22.678202,7.897129,0.000003);
			v(18.178192,15.691353,0.000001);
			v(22.678198,7.897120,-3.599997);
			v(18.178202,15.691349,-3.599998);
			v(-4.499982,-23.588469,0.000004);
			v(4.500017,-23.588449,0.000005);
			v(-4.499990,-23.588459,-3.599996);
			v(4.500008,-23.588463,-3.599995);
			v(-7.875000,1.948554,-8.600000);
			v(-2.249998,-7.794231,-8.600000);
			v(2.250000,-7.794232,-8.600000);
			v(7.875000,1.948558,-8.600000);
			v(5.625000,5.845673,-8.600000);
			v(-5.625000,5.845670,-8.600000);
			v(0.000001,-0.000001,-8.600000);

			f(12,7,6,0.182554,0.276566,0.363749,0.221901,0.363642,0.331619,-0.000000,0.000000,1.000000);
			f(12,8,7,0.182554,0.276566,0.137455,0.084511,0.363749,0.221901,-0.000000,0.000000,1.000000);
			f(12,9,8,0.182554,0.276566,0.046831,0.139272,0.137455,0.084511,-0.000000,0.000000,1.000000);
			f(12,10,9,0.182554,0.276566,0.046563,0.413567,0.046831,0.139272,0.000000,0.000000,1.000000);
			f(12,11,10,0.182554,0.276566,0.137081,0.468523,0.046563,0.413567,-0.000000,-0.000000,1.000000);
			f(12,6,11,0.182554,0.276566,0.363642,0.331619,0.137081,0.468523,-0.000000,-0.000000,1.000000);
			f(26,25,31,0.616528,0.180390,0.729808,0.248842,0.639264,0.276369,0.000000,0.000000,-1.000000);
			f(31,27,26,0.639264,0.276369,0.571269,0.207868,0.616528,0.180390,0.000000,0.000000,-1.000000);
			f(31,28,27,0.639264,0.276369,0.571403,0.345015,0.571269,0.207868,0.000000,0.000000,-1.000000);
			f(31,29,28,0.639264,0.276369,0.616715,0.372396,0.571403,0.345015,0.000000,0.000000,-1.000000);
			f(31,30,29,0.639264,0.276369,0.729862,0.303701,0.616715,0.372396,0.000000,0.000000,-1.000000);
			f(31,25,30,0.639264,0.276369,0.729808,0.248842,0.729862,0.303701,0.000000,0.000000,-1.000000);
			f(0,1,30,0.820353,0.221315,0.820460,0.331033,0.729862,0.303701,-0.467610,0.269974,-0.841698);
			f(0,30,25,0.820353,0.221315,0.729862,0.303701,0.729808,0.248842,-0.467610,0.269974,-0.841698);
			f(1,2,29,0.820460,0.331033,0.594166,0.468424,0.616715,0.372396,-0.000000,0.649998,-0.759936);
			f(1,29,30,0.820460,0.331033,0.616715,0.372396,0.729862,0.303701,-0.000000,0.649998,-0.759936);
			f(2,3,29,0.594166,0.468424,0.503542,0.413662,0.616715,0.372396,0.467610,0.269974,-0.841698);
			f(3,28,29,0.503542,0.413662,0.571403,0.345015,0.616715,0.372396,0.467610,0.269975,-0.841698);
			f(3,4,27,0.503542,0.413662,0.503274,0.139367,0.571269,0.207868,0.562915,-0.324999,-0.759935);
			f(3,27,28,0.503542,0.413662,0.571269,0.207868,0.571403,0.345015,0.562915,-0.324999,-0.759935);
			f(4,5,27,0.503274,0.139367,0.593792,0.084411,0.571269,0.207868,-0.000000,-0.539949,-0.841698);
			f(5,26,27,0.593792,0.084411,0.616528,0.180390,0.571269,0.207868,-0.000000,-0.539949,-0.841698);
			f(5,0,25,0.593792,0.084411,0.820353,0.221315,0.729808,0.248842,-0.562915,-0.324999,-0.759936);
			f(5,25,26,0.593792,0.084411,0.729808,0.248842,0.616528,0.180390,-0.562915,-0.324999,-0.759935);
			f(24,22,21,0.913422,0.000135,0.955254,0.000000,0.955497,0.083016,0.000002,-1.000000,0.000004);
			f(24,21,23,0.913422,0.000135,0.955497,0.083016,0.913664,0.083151,-0.000000,-1.000000,-0.000003);
			f(5,4,23,0.593792,0.084411,0.503274,0.139367,0.547228,0.000000,0.000000,-0.000001,-1.000000);
			f(4,24,23,0.503274,0.139367,0.456711,0.054956,0.547228,0.000000,0.000000,-0.000001,-1.000000);
			f(10,11,22,0.046563,0.413567,0.137081,0.468523,0.000000,0.497978,-0.000000,0.000001,1.000000);
			f(11,21,22,0.137081,0.468523,0.090517,0.552934,0.000000,0.497978,-0.000000,0.000001,1.000000);
			f(4,10,22,0.913669,0.915405,0.955501,0.915540,0.955254,1.000000,1.000000,0.000001,-0.000003);
			f(4,22,24,0.913669,0.915405,0.955254,1.000000,0.913422,0.999866,1.000000,0.000001,-0.000003);
			f(11,5,23,0.955683,0.146782,0.913851,0.146917,0.913664,0.083151,-1.000000,-0.000001,0.000002);
			f(11,23,21,0.955683,0.146782,0.913664,0.083151,0.955497,0.083016,-1.000000,-0.000001,0.000002);
			f(20,18,17,0.914878,0.501792,0.956711,0.501927,0.956550,0.556785,0.866025,0.500001,0.000002);
			f(20,17,19,0.914878,0.501792,0.956550,0.556785,0.914718,0.556651,0.866026,0.500000,-0.000002);
			f(3,2,19,0.503542,0.413662,0.594166,0.468424,0.457143,0.498173,0.000000,0.000000,-1.000000);
			f(2,20,19,0.594166,0.468424,0.547767,0.552934,0.457143,0.498173,0.000000,0.000000,-1.000000);
			f(8,9,18,0.137455,0.084511,0.046831,0.139272,0.091057,0.000000,-0.000000,-0.000000,1.000000);
			f(9,17,18,0.046831,0.139272,0.000432,0.054762,0.091057,0.000000,-0.000000,-0.000000,1.000000);
			f(2,8,18,0.956958,0.915405,0.998791,0.915540,0.998544,1.000000,-0.500000,0.866025,-0.000002);
			f(2,18,20,0.956958,0.915405,0.998544,1.000000,0.956711,0.999866,-0.500000,0.866025,-0.000002);
			f(9,3,19,0.956303,0.641246,0.914471,0.641111,0.914718,0.556651,0.500001,-0.866025,0.000002);
			f(9,19,17,0.956303,0.641246,0.914718,0.556651,0.956550,0.556785,0.500001,-0.866025,0.000002);
			f(16,14,13,0.958167,0.501792,1.000000,0.501927,0.999840,0.556785,-0.866025,0.500000,-0.000001);
			f(16,13,15,0.958167,0.501792,0.999840,0.556785,0.958007,0.556651,-0.866026,0.500000,-0.000000);
			f(1,0,16,0.820460,0.331033,0.820353,0.221315,0.913315,0.221216,0.000001,-0.000000,-1.000000);
			f(1,16,15,0.820460,0.331033,0.913315,0.221216,0.913422,0.330934,0.000001,-0.000000,-1.000000);
			f(6,7,13,0.363642,0.331619,0.363749,0.221901,0.456711,0.222001,-0.000001,0.000000,1.000000);
			f(6,13,14,0.363642,0.331619,0.456711,0.222001,0.456604,0.331719,-0.000001,0.000000,1.000000);
			f(7,1,13,0.999593,0.641246,0.957760,0.641111,0.999840,0.556785,0.500000,0.866026,0.000000);
			f(1,15,13,0.957760,0.641111,0.958007,0.556651,0.999840,0.556785,0.500000,0.866026,0.000001);
			f(0,6,14,0.914608,0.406003,0.956441,0.405868,0.956721,0.501657,-0.499999,-0.866026,0.000000);
			f(0,14,16,0.914608,0.406003,0.956721,0.501657,0.914888,0.501792,-0.500000,-0.866026,0.000000);
			f(6,0,5,0.956441,0.405868,0.914608,0.406003,0.913851,0.146917,-0.866025,-0.500000,0.000000);
			f(6,5,11,0.956441,0.405868,0.913851,0.146917,0.955683,0.146782,-0.866025,-0.500000,0.000001);
			f(3,9,10,0.914471,0.641111,0.956303,0.641246,0.955501,0.915540,0.866026,-0.500000,0.000001);
			f(3,10,4,0.914471,0.641111,0.955501,0.915540,0.913669,0.915405,0.866026,-0.500000,-0.000001);
			f(1,7,8,0.957760,0.641111,0.999593,0.641246,0.998791,0.915540,-0.000000,1.000000,0.000000);
			f(1,8,2,0.957760,0.641111,0.998791,0.915540,0.956958,0.915405,-0.000000,1.000000,-0.000001);
			
			this.x = 0.000000;
			this.y = 0.000000;
			this.z = 0.000000;
			
			this.rotateX = 0.000000;
			this.rotateY = 0.000000;
			this.rotateZ = 0.000000;
			
			this.scaleX = 1.000000;
			this.scaleY = 1.000000;
			this.scaleZ = 1.000000;
			return (l);
		}
	}
}